<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- bootstrap -->
    <link rel="stylesheet" href="/assets/css/bootstrap.min.css">
    <script src="/assets/js/bootstrap.min.js"></script>
    <!-- md editor -->
    <link rel="stylesheet" href="/assets/editormd/css/editormd.min.css">
    <title>博客</title>
</head>

<body>
    <div class="container">
        {{ template "header" }}

        <form action="/post" method="post">
            <div class="row">

                <div class="col-md-8">
                    <div id="test-editormd">
                        <textarea name="content" style="display:none;"></textarea>
                    </div>
                </div>

                <div class="col-md-4 mt-3">
                    <label for="title" class="form-label">请输入标题</label>
                    <input type="text" name="title" class="form-control" id="titile"><br>

                    <label for="tag" class="form-label">请输入标签</label>
                    <input type="text" name="tag" class="form-control" id="tag"><br>

                    <button type="submit" class="btn btn-primary">发布</button>
                </div>
            </div>
        </form>
    </div>

    <script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <script src="assets/editormd/editormd.min.js"></script>
    <script type="text/javascript">
        $(function () {
            var editor = editormd("test-editormd", {
                width: "100%",
                height: "450",
                syncScrolling: "single",
                path: "assets/editormd/lib/",
                watch: false,
            });
        });
    </script>

</body>

</html>